package com.lagou.service.impl;

import com.lagou.dao.DepartmentDao;
import com.lagou.domain.Department;
import com.lagou.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentDao departmentDao;

    public List<Department> findAll() {

        return departmentDao.findAll();
    }

    @Override
    public Department findById(Integer id) {

        return departmentDao.findById(id);
    }

    @Override
    public void add(Department dept) {

        departmentDao.add(dept);
    }

    @Override
    public void updateById(Department dept) {

        departmentDao.updateById(dept);
    }

    @Override
    public void deleteById(Integer id) {

        departmentDao.deleteById(id);
    }


}
